<div ng-include=" 'app/tpl/header.html' "></div>

<div id="main" class="container">
    <form action="">
        <div class="form-group has-feedback">
            <input ng-model="kw" type="text" class="form-control" placeholder="搜索菜品名称和原料"/>
            <span class="glyphicon glyphicon-search form-control-feedback"></span>
        </div>
    </form>
    <div class="list-group" ng-repeat="dish in dishList">
        <!--<a href="#/detail?did={{dish.did}}" class="list-group-item">-->
        <a href="#/detail/{{dish.did}}" class="list-group-item">
            <div class="media">
                <div class="media-left media-middle">
                    <img class="media-object" ng-src="app/img/{{dish.img_sm}}" alt="...">
                </div>
                <div class="media-body">
                    <h4 class="media-heading">{{dish.name}}</h4>
                    <div class="">{{dish.material}}</div>
                    <div class="border-top"><span class=" price">￥{{dish.price}}</span></div>
                </div>
            </div>
        </a>
    </div>

    <button ng-if="hasMore" class="btn btn-block btn-success" ng-click="getMore()" ng-disabled="isloading">
        <span ng-hide="isloading">加载更多</span>
        <img ng-src="app/img/loading.gif" alt="" ng-show="isloading"/>
    </button>

    <p ng-hide="hasMore" class="alter alert-danger text-center">
        <span class="glyphicon glyphicon-warning-sign"></span>
        已经没有数据了！
    </p>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>



<div ng-include=" 'app/tpl/footer.html' "></div>

